 <?php
	print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n");
	print("<Result>\n");
	if(!isset($_GET["name"]) || !isset($_GET["KID"]) || !isset($_GET["type"]))
	{
		print("</Result>\n");
		return;
	}
	$db = mysql_connect("localhost","root","root");
    mysql_select_db("brainway");
	$query = "update knowledge_name set name=\"".$_GET["name"]."\" where KID=".$_GET["KID"];
    $result = mysql_query($query);
    if($result==null)  
    {
        print("</Result>\n");
		return;
    }

    print(" <ID>".$_GET["KID"]."</ID> \n");
    print(" <name>".$_GET["name"]."</name> \n");
    print(" <type>".$_GET["type"]."</type> \n");
    print("</Result>");
?>